return "Drag to slider 'handle' to enable control of video play time. Requires additional 'extent' member which limits the handle travel range." & RETURN & "PARAMETERS:" & RETURN & "ΓÇó Video Sprite - Enter the number of sprite channel in which video is displayed." & RETURN & "ΓÇó Extent Sprite - Enter the number of sprite channel that contains the 'extent' sprite." & RETURN & "ΓÇó Hilite Member - Member to display while handle is being dragged." & RETURN & "ΓÇó Dynamic - If set, video time will be updated while handle is dragged, else when handle is released."
end
on compute_val me
val = 0.0
val = float(me.currentScreenVal) / float(me.extentlength)
val = val * me.valrange
val = val + me.min
return val
end
on send_the_val me, val
pMovieTime = val * pDuration
seek(sprite(videoSprite), pMovieTime)
end
on beginSprite me
pDuration = sprite(videoSprite).duration
me.min = 0.0
me.max = 1.0
handle = me.spriteNum
me.tracking = 0
me.newLocH = the locH of sprite handle
me.newLocV = the locV of sprite handle
me.newLocV = the locV of sprite me.extentSprite
me.minScreen = the left of sprite me.extentSprite + pleftOffset
me.maxScreen = the right of sprite me.extentSprite - prightOffset
set the locH of sprite handle to me.minScreen
set the locV of sprite handle to me.newLocV
me.valrange = me.max - me.min
me.extentlength = me.maxScreen - me.minScreen
end
on prepareFrame me
if tracking then
handle = me.spriteNum
extent = me.extentSprite
me.newLocH = the mouseH
me.newLocV = the locV of sprite extent
if me.newLocH < minScreen then
me.newLocH = minScreen
end if
if me.newLocH > maxScreen then
me.newLocH = maxScreen
end if
me.currentScreenVal = me.newLocH - me.minScreen
set the locH of sprite handle to me.newLocH
set the locV of sprite handle to me.newLocV
if me.dynamic then
send_the_val(me, compute_val(me))
sendAllSprites(#setPPVis, 0)
end if
else
if float(pDuration) = 0 then
pDuration = sprite(videoSprite).duration
end if
if float(pDuration) <> 0 then
x = float(sprite(videoSprite).currentTime) / float(pDuration)